Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixup pipBulkShow function to prevent breaking with numerous names #83

Open
wants to merge 1 commit into
base: scip
Choose a base branch
from

Conversation

ficapy
Copy link

@ficapy ficapy commented May 14, 2023

When there are very numerous pip dependencies, execSync will report an error, see https://stackoverflow.com/questions/63796633/spawnsync-bin-sh-enobufs

@williamfzc
Copy link

williamfzc commented Oct 15, 2023

Same here if my project using some large libs like pytorch.

@Titou325
Copy link
Contributor

Titou325 commented Nov 7, 2023

Hi,

Same thing here, passing --environment empty.json allows indexing but pip3 show -f packageA packageB ... fails with ENOBUFS. A workaround is to parse the environment by ourselves in the meantime.

The proposed fix of extending the buffer size to 10MB seems good enough for a first attempt. In the future this can be switched to a parsing window but requires switching to async logic as far as I understand.

Are there pending tasks for this PR?

Copy link
Contributor

@Titou325 Titou325 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both execSync and spawnSync allow the maxBuffer option (see https://nodejs.org/docs/latest-v16.x/api/child_process.html#child_processexecsynccommand-options). The refactoring is not needed but good practice.

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants